#include<iostream>
#include<cstring>

using namespace std;
unsigned long long   a[100000001];

void qianzhuihe()
{
	unsigned long long  n;
	cin >> n;
	a[0] = (long long)0;
	a[1] = (long long) 1;
	for (unsigned long long  i=2;i<=n;i++)
	{
		a[i] = a[i-2]+a[i-1];		
	}
	
	cout << a[n]%2147483647 << endl;
	//printf("%ll\n",a[n]%2147483647);//
	
}

int main()
{
	qianzhuihe();
	//diguis();
	return 0;	
} 
